1. Technical Field
The present invention relates to an image coding and decoding apparatus which concurrently reads/writes a plurality of pixel data from/to a memory.
2. Background Art
In a process where digital motion picture signals are compression-coded and decompression-decoded in a real time basis, a data processing amount becomes unduly large in a unit of time.
In this specifications, terms compression and coding are interchangeably used; similarly, terms decompression and decoding are interchangeably used.
Accompanied by this large amount of data to be processed, a data quantity also becomes large which is read/written from/to a memory. These data are temporarily stored in the memory in a coding/decoding apparatus. Since there is the limit in a rate of reading and writing data in the memory, it is indispensable that the plural pixel data be read from and written to the memory concurrently and in parallel.
When the plural pixel data are simultaneously read from and written to the memory, pixel data, which is in reality not necessary to be read/written, are also read and written. The amount of such unnecessary data depends on processing combination where a stream of pixel data are concurrently processed with another stream of pixel data. Thus, even though pixel data to be concurrently processed is the same, an amount of effective data capable of being read/written in a unit of time differs depending on how the pixel data are combined for the processing purpose. Such a difference becomes more significant in a motion-picture-signal processing based on an ISO, MPEG standard and so on which include a processing in which an image is reconstructed from a reference image through a motion compensation. Here, the ISO stands for International Standard Organization, and MPEG stands for Moving Picture Experts Group.
Now, in the event that the reference image is read out of the memory and then the plural pixel data are concurrently read out, there is a problem where unnecessary pixel data is mixed into the data read out. The less the amount of the unnecessary pixel data are, the more readable the amount of the effective data is per unit time.
In view of the above-described points, the luminance-signal pixel data of 2 pixels in the vertical direction and 2 pixels in the horizontal direction are simultaneously processed with chrominance signal (Cb) and another chrominance signal (Cr) having the same position with the luminance signal, in the conventional practice as shown in FIG. 1. In FIG. 1, a small circle represents a luminance signal, a small triangle represents a chrominance signal (Cb), and an symbol X represents a chrominance signal (Cr).
In this method described above with reference to FIG. 1, the amount of unnecessary data read at the time of reading a reference image is minimal as far as the image processing is carried out only in a frame unit.
It is to be noted that two field scanning lines are equivalent to a single frame scanning line.
On the other hand, it is reported that when the image data are processed not only in the frame unit but also in a field unit, the image compression efficiency is improved further. When the image data are processed in the field unit, the image data of the odd-numbered row and the image data of the even-numbered row within a frame belong to a different field respectively, as related to interlaced scanning of a television display.
Referring to FIG. 1, since the adjacently-disposed vertical 2 pixels are simultaneously processed, the pixel data belonging to the different field are also read/written from and to the memory. In other words, even though the pixel data belonging to one stream of field only is reqired to be read/written from and to the memory, other pixel data belonging to the other stream of field is inevitably read/written from and to the memory. As a result thereof, two times of the necessary amount of data are read out and written in reality.
Now, according to a visual characteristic intrinsic to the human nature, a sensitivity against color signals (chrominance signals) is dull compared to that against the luminance signals. Utilizing this characteristic, there is often used an image mode called 4:2:0 in which the color signal is compressed by a half in horizontal and vertical directions, respectively. If this 4:2:0 mode is employed, the ratio of luminance-signal pixel data amount over color-signal pixel data amount becomes 2:1.
However, the ratio of the luminance-signal pixel data amount over the color-signal pixel data amount is 1:1 in the method shown in FIG. 1. Thus, half of the color signals are wasted data which are not used in the course of image reconstruction. In other words, 4/3 times,of the data which are necessary for reconstructing the image are read/written.
In order to display the pixel data in the 4:2:0 image mode, an interpolation process is required in which the color signals are interpolated in the vertical direction. Then, two pixel data each of which locates by a distance of one row from other in the same field are read out of the memory, and then an average of the two is taken. Then, the average-taken pixel which is equivalent to one pixel is interpolated.
Therefore, referring to FIG. 1, reading is carried out twice. However, the color-signal pixel data and the luminance-signal pixel data are simultaneously read out, the luminance-signal pixel data are read also twice in the conventional practice shown in FIG. 1. In other words, the luminance-signal image data are read out twice unnecessarily at the time the pixel data are displayed on a display unit.
This is also illustrated in FIG. 2 and FIG. 3.
In FIG. 2, there are shown dotted triangle and X marks; this means that the dotted triangle mark (Cb pixel) and the dotted X mark (Cr pixel) are not existent in the 2:0 mode. Thus, in the 4:2:0 mode, the Cb pixel which is right above the dotted triangle mark (Cb pixel), and the dotted triangle are added so that an average thereof is taken to calculate the value of the dotted Cb pixel. As for dotted X mark (Cr pixel), similar procedure is taken as in the dotted triangle mark (cb pixel). Note that, in order to display the image, the values of both dotted triangle mark (Cb pixel) and dotted X mark (Cr pixel) are necesary in the 4:2:0 mode.
Now, though Y, Cb and Cr pixels are separately illustrated in FIG. 1, those are combindedly expressed in FIG. 2. In FIG. 1, the interval between the Cb pixels are wider than the interval between luminance (Y) pixels; in a real image viewed, the interval between the Cb pixels is twice as that between Y pixels. Similarly, the interval between the Cr pixels is twice as that between Y pixels. In FIG. 2, such a relation between the Y and color difference signals in terms of the interval is reflected, so that the interval between color signals is twice as that between Y signals. It is to be noted that, although the positions of the Cb pixel and Cr pixel are different in FIG. 2 for the sake of easy clarification, the Cr pixel and Cb pixel are overlapped in reality (i.e., the positions of Cb and Cr are the same).
Accordingly, wasted amount of data which is read/written in the event that the image data are processed per the field unit, becomes unduly large. Thereby, the amount of effective data which can be read/written from and to the memory per the unit time is reduced. As a result thereof, the wasted time for such an unnecessary pixel data is undesirably increased in the image coding and decoding apparatus. Thus, it takes much longer time to reconstruct a single image in the conventional practice. In other words, a size in which the image can be reconstructed is very limited.
As described above, when the image data are processed in the field unit, there is a problem where the read/write amount for the unwanted pixel data is undesirably large, so that the amount of the effective data which can be read/written from and to the memory is small in the conventional practice.